Skip to content

Fix saved config profiles with env overrides#695

Open
willccbb wants to merge 3 commits into
mainfrom
codex/fix-prime-config-usesave
Open

Fix saved config profiles with env overrides#695
willccbb wants to merge 3 commits into
mainfrom
codex/fix-prime-config-usesave

Conversation

@willccbb
Copy link
Copy Markdown
Member

@willccbb willccbb commented May 30, 2026

Summary

  • Make prime config use <profile> fail when active credential/user/API URL env vars or ambient PRIME_CONTEXT would mask the selected saved profile.
  • Keep one-shot --context working for config use and restore context state after the command.
  • Keep existing active saved-profile syncing, but write persisted config values instead of env-overridden values.

Testing

  • uv run ruff check packages/prime/src/prime_cli/core/config.py packages/prime/src/prime_cli/commands/config.py packages/prime/src/prime_cli/main.py packages/prime/tests/test_config_profiles.py packages/prime/tests/test_config_delete.py
  • uv run ruff format --check packages/prime/src/prime_cli/core/config.py packages/prime/src/prime_cli/commands/config.py packages/prime/src/prime_cli/main.py packages/prime/tests/test_config_profiles.py packages/prime/tests/test_config_delete.py
  • uv run pytest packages/prime/tests/test_config_profiles.py packages/prime/tests/test_config_delete.py packages/prime/tests/test_switch.py -q

Comment thread packages/prime/src/prime_cli/commands/config.py Outdated
Comment thread packages/prime/src/prime_cli/commands/whoami.py
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b992865029

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/prime/src/prime_cli/commands/config.py Outdated
@willccbb willccbb force-pushed the codex/fix-prime-config-usesave branch 2 times, most recently from 861a7fb to 19c3309 Compare May 30, 2026 07:57
Comment thread packages/prime/src/prime_cli/commands/login.py
@willccbb willccbb force-pushed the codex/fix-prime-config-usesave branch 2 times, most recently from 07a8e17 to e7b86e9 Compare May 30, 2026 08:08
Comment thread packages/prime/src/prime_cli/core/config.py Outdated
@willccbb willccbb force-pushed the codex/fix-prime-config-usesave branch from e7b86e9 to e3c8ea7 Compare May 30, 2026 08:12
Comment thread packages/prime/src/prime_cli/commands/config.py Outdated
@willccbb willccbb force-pushed the codex/fix-prime-config-usesave branch from e3c8ea7 to cf0babf Compare May 30, 2026 08:16
@willccbb willccbb marked this pull request as draft May 30, 2026 08:42
@willccbb willccbb force-pushed the codex/fix-prime-config-usesave branch from cf0babf to 071acdf Compare May 30, 2026 08:50
@willccbb willccbb changed the title Refine prime profile switching and env override handling Fix saved config profiles with env overrides May 30, 2026
Comment thread packages/prime/src/prime_cli/commands/config.py
@willccbb willccbb force-pushed the codex/fix-prime-config-usesave branch from 071acdf to e3de47f Compare May 30, 2026 08:54
Comment thread packages/prime/src/prime_cli/commands/config.py Outdated
@willccbb willccbb force-pushed the codex/fix-prime-config-usesave branch from e3de47f to c08cf33 Compare May 30, 2026 08:59
@willccbb willccbb marked this pull request as ready for review May 30, 2026 09:03
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c08cf3367b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/prime/src/prime_cli/commands/config.py
@willccbb willccbb force-pushed the codex/fix-prime-config-usesave branch from c08cf33 to 9c8c7c3 Compare May 30, 2026 09:11
Comment thread packages/prime/src/prime_cli/core/config.py
@willccbb willccbb force-pushed the codex/fix-prime-config-usesave branch from 9c8c7c3 to 2fd071a Compare May 30, 2026 09:16
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2fd071a. Configure here.

Comment thread packages/prime/src/prime_cli/commands/config.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant